package com.sunrise.generico.entidade;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

import com.sunrise.generico.entidade.iface.EntidadeNegocio;

@Entity
@Table(name = "regra_meta")
public class RegraMeta implements EntidadeNegocio {


	/**
	 * 
	 */
	private static final long serialVersionUID = 8588225170071564906L;
	
	@Id
	@SequenceGenerator(name="pk_sequence",sequenceName="regra_meta_id_seq", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="pk_sequence")
	@javax.persistence.Column
	@Getter @Setter
	private Long id;
	
	@Column(name = "valor")
	@Getter @Setter
	private BigDecimal valor;
	
	@ManyToOne
	@Getter @Setter
	private Meta meta;
	
	@OneToOne
	@Getter @Setter
	private Perfil perfil;
	
	@OneToOne
	@Getter @Setter
	private Usuario vendedor;
	
	@OneToOne
	@Getter @Setter
	private Produto produto;

	@OneToOne
	@Getter @Setter
	private Marca marca;
	
	@OneToOne
	@Getter @Setter
	private Categoria categoria;
	
	@OneToOne
	@Getter @Setter
	private Filial filial;
	
	
}
